#pragma once
#include "..\duilib\webbrowsereventhandler.h"

#define WM_DOWNLOAD_FILE	WM_USER + 500

class CCustomWebBrowserEventHandler :
	public CWebBrowserEventHandler
{
public:
	CCustomWebBrowserEventHandler(void);
	~CCustomWebBrowserEventHandler(void);

	void BeforeNavigate2( IDispatch *pDisp,VARIANT *&url,VARIANT *&Flags,VARIANT *&TargetFrameName,VARIANT *&PostData,VARIANT *&Headers,VARIANT_BOOL *&Cancel );

	HRESULT STDMETHODCALLTYPE Download(IMoniker *pmk, IBindCtx *pbc, DWORD dwBindVerb, LONG grfBINDF, BINDINFO *pBindInfo, LPCOLESTR pszHeaders, LPCOLESTR pszRedir, UINT uiCP);


};

